import type { FC } from 'react';
import { TouchableOpacity } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
import AddIcon from '@/assets/icons/plus_icon.svg';
import styles from './styles';

type AddButtonProps = {
  onPress?: () => void;
}

const AddButton: FC<AddButtonProps> = (props) => {
  return (
    <TouchableOpacity
      activeOpacity={.8}
      onPressIn={props.onPress}
      style={[styles.wrapper, styles.shadow]}
    >
      <LinearGradient
        style={styles.content}
        colors={['#5151C6', '#888BF4']}
      >
        <AddIcon />
      </LinearGradient>
    </TouchableOpacity>
  );
}

export default AddButton;